package 学校work.test1;
class Student {
    int age = 18;
}
class MidStudent extends Student{
    int age = 28;
    void printInfo(){
        int age=38;
        System.out.println("局部变量age:" + age);
    }
    public int getAge() {
        return super.age;
    }
}
public class Solution {
    public static void main(String[] args) {
        MidStudent midStudent = new MidStudent();
        midStudent.printInfo();
        System.out.println("成员变量age:" + midStudent.age);
        System.out.println("继承父类对象age:" + midStudent.getAge());
    }
}
